/*
 * \brief  Console backend for Pistachio
 * \author Julian Stecklina
 * \date   2008-08-20
 */

/*
 * Copyright (C) 2008-2009 Julian Stecklina
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

namespace Pistachio {
#include <l4/kdebug.h>
}

#include <base/console.h>
#include <base/printf.h>

namespace Genode
{
	class Pistachio_console : public Console
	{
		protected:

			virtual void _out_char(char c) {
				Pistachio::L4_KDB_PrintChar(c);
			}
	};
}


using namespace Genode;


static Pistachio_console pistachio_console;


void Genode::printf(const char *format, ...)
{
	va_list list;
	va_start(list, format);

	pistachio_console.vprintf(format, list);
}


void Genode::vprintf(const char *format, va_list list)
{
	pistachio_console.vprintf(format, list);
}
